home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 56000tar.z / 56000tar / 56000 / speech / lgsol1.hlp < prev   
Text File  |  1991-11-26  |  4KB  |  123 lines

  1.          Name: LGSOL1
  2.          Type: Assembler Program
  3.       Version: 2.0
  4.  Date Entered: 15-Mar-87
  5.   Last Change: 21-May-87 (improved speed)
  6.  
  7.   Description: Leroux-Gueguen Solution for PARCOR (LPC) Coefficients
  8.  
  9.  This program uses the the Leroux-Gueguen algorithm to find a set of
  10.  PARCOR coefficients given an autocorrelation vector.  These
  11.  PARCOR coefficients can be used in speech analysis/synthesis systems
  12.  such as: vocoding, stochastic speech coding, multipulse speech
  13.  coding, speech recognition, etc.
  14.  
  15.  This program will solve any order system by equating the
  16.  order "NK" to the number of K coefficients desired.  The program
  17.  is written as an illustrative example and the user may 
  18.  change the routine as needed.  The program will:
  19.  
  20.   1. Read a data file to determine how many sets of coefficients
  21.      to calculate.
  22.   2. Read the autocorrelations from a data file.
  23.   3. Perform the Leroux-Gueguen algorithm to find the K's.
  24.   4. Output the K coefficients to a data file.
  25.   5. Continue steps 2,3,4 for the number of specified sets of 
  26.      coefficients.
  27.  
  28.  The explanation of the algorithm is beyond the scope of this
  29.  help file but the coding of the algorithm can be easily
  30.  understood by examining the FORTRAN subroutine below (LGSOL).  This
  31.  coding of the Leroux-Gueguen algorithm is a modified version
  32.  of the source code presented at the 1987 IEEE International
  33.  Conference on Acoustics, Speech and Signal Processing (ICASSP 87) [1].
  34.  The source code was then modified to split out the array indexes and
  35.  references to the loop indexes.  These variables were then
  36.  replaced with separate addressing variables as shown in the FORTRAN
  37.  source code below (LGSOL1).  These separate variables become address
  38.  registers in the DSP56000/1 address ALU.  This provides an easy
  39.  method for converting a FORTRAN source program to DSP56000/1 code.
  40.  
  41.  Approximate execution times for LGSOL1 on a 20.5 Mhz DSP56000/1 are:
  42.  
  43.  NK = 8,  8th  order: 46.2  uS 
  44.  NK = 10, 10th order: 61.6  uS 
  45.  NK = 16, 16th order: 117.2 uS
  46.   
  47.  Original FORTRAN source program (with slight modifications):
  48.  
  49.        subroutine lgsol(r,n,fk)
  50.        dimension r(0:*),fk(*),bim1(14),bi(14)
  51.  
  52.        fk(1)=-r(1)/r(0)
  53.        bim1(1)=r(1)
  54.        bim1(2)=r(0)+fk(1)*r(1)
  55.        do 5 i=2,n
  56.            yi=r(i)
  57.            bi(1)=yi
  58.            im1=i-1
  59.            do 4 j=1,im1
  60.              bi(j+1)=bim1(j)+fk(j)*yi
  61.              yi=yi+fk(j)*bim1(j)
  62.              bim1(j)=bi(j)
  63.  4          continue
  64.            fk(i)=-yi/bim1(i)
  65.            bim1(i+1)=bim1(i)+fk(i)*yi
  66.            bim1(i)=bi(i)
  67.  5      continue
  68.        return
  69.        end
  70.  
  71.  Modified FORTRAN source for direct DSP56000/1 conversion:
  72.  
  73.        subroutine lgsol1(r,n,fk)
  74.        parameter numk=8
  75.        dimension r(0:*),fk(*),bim1(numk+1),bi(numk)
  76.  
  77.        ifk=1
  78.        fk(ifk)=-r(1)/r(0)
  79.        ibim1=1
  80.        bim1(ibim1)=r(1)
  81.        ibim1=ibim1+1
  82.        bim1(ibim1)=r(0)+fk(ifk)*r(1)
  83.        ifk=ifk+1
  84.        irptr=2
  85.        im1=1
  86.        ibi=2
  87.        do 5 i=1,im1
  88.            yi=r(irptr)
  89.            irptr=irptr+1
  90.            jbi=1
  91.            bi(jbi)=yi
  92.            jbi=jbi+1
  93.            jbm1=1
  94.            jfk=1
  95.            do 4 j=1,im1
  96.              bi(jbi)=bim1(jbm1)+fk(jfk)*yi
  97.              jbi=jbi-1
  98.              yi=yi+fk(jfk)*bim1(jbm1)
  99.              bim1(jbm1)=bi(jbi)
  100.              jbm1=jbm1+1
  101.              jfk=jfk+1
  102.              jbi=jbi+2
  103.  4          continue
  104.            fk(ifk)=-yi/bim1(ibim1)
  105.            bim1(ibim1+1)=bim1(ibim1)+fk(ifk)*yi
  106.            bim1(ibim1)=bi(ibi)
  107.            ibim1=ibim1+1
  108.            ibi=ibi+1
  109.            im1=im1+1
  110.            ifk=ifk+1
  111.  5      continue
  112.        return
  113.        end
  114.  
  115.  References
  116.  ----------
  117.  [1]  L. R. Morris, P. Barszczewski and J. Bosloy, "Algorithm Selection
  118.  and Software Time/Space Optimization for a DSP Micro-Based Speech
  119.  Processor for a Multi-Electrode Cochlear Implant," Proceedings of the
  120.  1987 IEEE International Conference on Acoustics, Speech and Signal
  121.  Processing (ICASSP87), paper 22.B4, pp. 972-975.
  122.  
  123.